package examples.fiberOptic;

/***********************************************************
 * @author FBA 2010/05/03
 * 
 ***********************************************************/
abstract public class Location implements Comparable<Location>
{
	private String name;

	/***********************************************************
	 * @param hisName
	 ***********************************************************/
	public Location(String hisName)
	{
		name = hisName;
	}

	/***********************************************************
	 * @return
	 ***********************************************************/
	public String getName()
	{
		return name;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Comparable#compareTo(java.lang.Object)
	 */
	public int compareTo(Location other)
	{
		return name.compareTo(other.name);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	public boolean equals(Object another)
	{
		return name.equals(((Location) another).name);
	}

	public String toString()
	{
		return getName();
	}
}
